import { createApp } from 'vue'
import { createPinia } from 'pinia'

// 使用Element-plus组件喝图标
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 使用Remix icon图标库
import 'remixicon/fonts/remixicon.css'
// cookie
import {setCookie,getCookie,checkCookie,clearCookie } from "./utils/cookie.js";

// animate动画库
import 'animate.css/animate.min.css'

// 设置打字机效果
// import EasyTyper from 'easy-typer-js'

// 设置全局样式
import './assets/style/router_active.css'

import App from './App.vue'
import router from './router'
import axios from 'axios'

const app = createApp(App)

// app.use(EasyTyper)
app.use(createPinia())
app.use(ElementPlus, {locale: zhCn})
app.use(router)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 设置cookie
app.config.globalProperties.$setCookie = setCookie
app.config.globalProperties.$getCookie = getCookie
app.config.globalProperties.$checkCookie = checkCookie
app.config.globalProperties.$clearCookie = clearCookie

app.mount('#app')
